
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>上传图片</title>
<script type="text/javascript" src="../static/index.js"></script>
　<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
	<table border="1" cellspacing="1" cellpadding="1" align="center">
		<tr>
			<button type="submit"
				th:onclick="javascript:test()"
				class="btn btn-primary">js方法测试</button>
		</tr>
		<tr>
			<td style="background: #fff" align="center" width="400px">
				<!-- 图片文本框 --> <input type="file" class="form-control" id="file"
				name="file" th:onchange="javascript:preview(this)"> <!-- 这个是在上传之前回显图片图片展示 -->
				<div id="preview">
					<!--这个是为了将页面返回的图片展示出来的.默认隐藏-->
					<img style="width: 100px; height: 100px; display: none"
						id="imgHidden" />
				</div> <!-- 提交...这里pageIndex和pageSize可传可不传,主要取决于提交之后是否需要回到当前页面. -->
				<button type="submit"
					th:onclick="javascript:submitForm()"
					class="btn btn-primary">提交</button>
			</td>
		</tr>
		<tr>
			<td colspan="2" style="background: #fff" align="center">底部</td>
		</tr>
	</table>
</body>
</html>